Skip to content

ARROW-12063: [C++] Add null placement option to sort functions - #11212

Closed
pitrou wants to merge 1 commit into
apache:masterfrom
pitrou:ARROW-12063-sort-null-placement
Closed

ARROW-12063: [C++] Add null placement option to sort functions#11212
pitrou wants to merge 1 commit into
apache:masterfrom
pitrou:ARROW-12063-sort-null-placement

Conversation

@pitrou

@pitrou pitrou commented Sep 22, 2021

Copy link
Copy Markdown
Member

No description provided.

@pitrou
pitrou requested a review from lidavidm September 22, 2021 16:04
@github-actions

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

@pitrou

pitrou commented Sep 22, 2021

Copy link
Copy Markdown
Member Author

@ianmcook @jonkeane You may want to review the docs and wordings.

@pitrou

pitrou commented Sep 22, 2021

Copy link
Copy Markdown
Member Author

@ursabot please benchmark

@ursabot

ursabot commented Sep 22, 2021

Copy link
Copy Markdown

Benchmark runs are scheduled for baseline = 3317f83 and contender = d30564a. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Finished ⬇️0.67% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.41% ⬆️2.38%] ursa-thinkcentre-m75q
Supported benchmarks:
ursa-i9-9960x: langs = Python, R, JavaScript
ursa-thinkcentre-m75q: langs = C++, Java
ec2-t3-xlarge-us-east-2: cloud = True

@lidavidm lidavidm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for pushing through all this.

@ianmcook

Copy link
Copy Markdown
Member

LGTM, thank you!

I'm curious why use a NullPlacement enum to instead of just a nulls_last Boolean. Might the enum be extended to include other options in the future (for example controlling whether NaNs come before or after nulls)?

@lidavidm

Copy link
Copy Markdown
Member

Even if we don't plan on extending the enum, personally I find something like NullPlacement::NullsFirst more readable than /*nulls_last=*/false. Especially since it's consistent with SortOrder::Ascending/Descending which you could otherwise argue is a boolean (but is more readable as an enum).

@ianmcook

Copy link
Copy Markdown
Member

Got it, makes sense, thanks.

for String arrays).

* \(4) The input must be an array. The default order is ascending.
* \(3) The input must be an array. The default order is ascending.

@ianmcook ianmcook Sep 22, 2021

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding here: "By default, nulls and NaNs come after any non-null values."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already above in the section summary.

@lidavidm lidavidm closed this in 96fdaf1 Sep 23, 2021
@pitrou
pitrou deleted the ARROW-12063-sort-null-placement branch September 23, 2021 16:53
ViniciusSouzaRoque pushed a commit to s1mbi0se/arrow that referenced this pull request Oct 20, 2021
Closes apache#11212 from pitrou/ARROW-12063-sort-null-placement

Authored-by: Antoine Pitrou <antoine@python.org>
Signed-off-by: David Li <li.davidm96@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants